#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
void solve()
{
    int a, b, n;
    cin >> n >> a >> b;
    if (a + b < n)
        cout << b + 1;
    else
        cout << n - a;
}
int main()
{
    solve();
    return 0;
}
